package com.ezops.poc.validations.converter;

import static org.junit.Assert.fail;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.beans.factory.annotation.Autowired;

import com.ezops.poc.validations.validators.converter.ConversionException;
import com.ezops.poc.validations.validators.converter.EzopsAlpahnumericConverter;
import com.ezops.poc.validations.validators.converter.UnknownFormatException;
@RunWith(MockitoJUnitRunner.class)
public class EzopsAlpahnumericConverterTestCase {

	@InjectMocks
	@Autowired
	EzopsAlpahnumericConverter converter;
	
	@Before
	public void setUp() {
		MockitoAnnotations.initMocks(this);

	}
	@Test
	public void testTryConvert() {
		String value = "wed";
		String format="0-8 chars";
		try {
			converter.tryConvert(value, format);
		} catch (ConversionException | UnknownFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			fail("Not yet implemented");
		}
	}

}
